package com.itheima.service;

/**
 * @author 斌叔
 * @description:
 * @create 2022-05-14 1:12
 */
//这是原始版本的接口
//public interface ProductService {
//    Product findByPid(Integer pid);
//}

import com.itheima.Product;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@FeignClient(name = "service-product",contextId = "productService")
//声明调用的提供者的name
public interface ProductService {
    //指定调用提供者的哪个方法
    // @FeignClient+@GetMapping 就是一个完整的请求路径 http://service- product/product/{pid}
    @GetMapping(value = "/product/{pid}")
    Product findById(@PathVariable("pid") Integer pid);
}